﻿namespace Entities;

/// <summary>
/// 商品规格
/// </summary>
public class ProductSku : BaseEntity<long>
{
    /// <summary>
    /// 编码
    /// </summary>
    public string No { get; set; } = default!;

    /// <summary>
    /// 商品ID
    /// </summary>
    public long ProductId { get; set; }

    /// <summary>
    /// 图片ID
    /// </summary>
    public long? ImageId { get; set; }

    /// <summary>
    /// 重量
    /// </summary>
    public decimal Weight { get; set; } = 0m;

    /// <summary>
    /// 商品价格
    /// </summary>
    public decimal Price { get; set; } = 0m;

    /// <summary>
    /// 商品
    /// </summary>
    public Product? Product { get; set; }

    /// <summary>
    /// 规格值集合
    /// </summary>
    public virtual List<SpecValue> SpecValues { get; set; } = [];

    /// <summary>
    /// 商品规格集合
    /// </summary>
    public virtual List<ProductSku> ProductSkUs { get; set; } = [];
}
